#include "ganttchart.h"
//#include <QtWidgets/QGraphicsScene>

GanttChart::GanttChart(QWidget *parent) : QGraphicsView(parent)
{
    m_scene = new QGraphicsScene(this);
    setScene(m_scene);
}

void GanttChart::addTask(const QString& name,int startDay,int duration,const QColor &color){
    int endDay = startDay + duration;
    m_scene->addRect(startDay,0,duration,50,QPen(),color);
    m_scene->addText(name,QFont("Arial",10));
}
